Class ModuleBase<T>
Provides a base class for a command module to inherit from.
Assembly: Revolt.Net.Commands.dll​
View Source​
Declaration
public abstract class ModuleBase<T> : object, IModuleBase where T : class, ICommandContext
Properties​
Context​
The underlying context of the command.
View Source​
Declaration
public T Context { get; }
Methods​
BeforeExecute(CommandInfo)​
The method to execute before executing the command.
View Source​
Declaration
protected virtual void BeforeExecute(CommandInfo command)
Parameters​
| Type | Name | Description |
|---|---|---|
| Revolt.Commands.Info.CommandInfo | command | The Revolt.Commands.Info.CommandInfo of the command to be executed. |
AfterExecute(CommandInfo)​
The method to execute after executing the command.
View Source​
Declaration
protected virtual void AfterExecute(CommandInfo command)
Parameters​
| Type | Name | Description |
|---|---|---|
| Revolt.Commands.Info.CommandInfo | command | The Revolt.Commands.Info.CommandInfo of the command to be executed. |
OnModuleBuilding(CommandService, ModuleBuilder)​
The method to execute when building the module.
View Source​
Declaration
protected virtual void OnModuleBuilding(CommandService commandService, ModuleBuilder builder)
Parameters​
| Type | Name | Description |
|---|---|---|
| Revolt.Commands.CommandService | commandService | The Revolt.Commands.CommandService used to create the module. |
| Revolt.Commands.Builders.ModuleBuilder | builder | The builder used to build the module. |